﻿using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;

namespace TFT_SPI_DisplayModule
{
    public class Program
    {
        public static void Main()
        {
            // write your code here
            TFT01 tft = new TFT01(true,false);
            while (true)
            {
                tft.ClearScreen();
                tft.SetOrientation(false);
                tft.DrawChar(100, 100, (byte)'A', tft.ColorFromRgb(255, 100, 100));
                tft.DrawString(0, 0, "Kjetil ruler", tft.ColorFromRgb(0, 255, 0));
                tft.DrawHorizontalLine(0, 0, 100, 0xffff);
                tft.DrawVerticalLine(100, 0, 100, tft.ColorFromRgb(255, 100, 100));

                Thread.Sleep(100);


                tft.ClearScreen();
                tft.SetOrientation(true);
                tft.DrawChar(100, 100, (byte)'A', tft.ColorFromRgb(255, 100, 100));
                tft.DrawString(0, 0, "Kjetil ruler", tft.ColorFromRgb(0, 255, 0)); 
                tft.DrawHorizontalLine(0, 0, 100, 0xffff);
                tft.DrawVerticalLine(100, 0, 100, 0xffff);
                Thread.Sleep(100);
            }
            
        }

    }
}
